<!doctype>
<html>
<head>
  <title>web-mail</title>
  <meta http-equiv=content-type content="text/html; charset=utf-8">
  <base href="<?php echo base_url();?>" />
  <link href="css/globle_v1.css" type="text/css" rel="stylesheet">
  <link href="css/inbox.css" type="text/css" rel="stylesheet">
  <link href="css/skin_blue.css" rel="stylesheet" type="text/css" id="lnkskin">

  <meta content="mshtml 6.00.6000.16809" name="generator">
  <style>
    body {min-width: 1000px;}
    .ibx_td_date, .ibx_th_date {
        width: 150px!important;
    }
  </style>
</head>
<body class="all_c_page inbox">
  <form id="recive_message" name="recive_message" action="" method="post">
    <input id="oformaction" type="hidden">
    <div class="contentwp">
      <div class="contentthemewp">
        <div class="gtitle"> &nbsp; 
            <b class="mtt">发件箱</b>&nbsp;&nbsp;(共&nbsp; <b class="fnt_red" id="ototalunread"><?php echo $total;?></b>&nbsp;封邮件) &nbsp;&nbsp;
            (&nbsp; <b class="fnt_red" id="ototalunread"><?php echo $hot;?></b>&nbsp;封星标邮件)
        </div>
        <div class="gtoolbar gtbrtop">
          <input class="btn btnnml" hidefocus type="submit" value="删除" outclass="btn btnnml impbtn" overclass="btn btnhv impbtn" onclick="del()">
          <div class="extra">
            <span class="txt">
              <?php echo $page;?>
            </span>
          </div>
        </div>
        <div class=ibx_main_wp>
          <table class="ibx_gtable f2img ibx_gtable_tt" id="otablehead">
            <tbody>
              <tr>
                <th class="ibx_th_f"></th>
                <th class="ibx_th_chkbx">
                  <input id="oformcheckall" name="selectall" type="checkbox" onclick="selectAll()"></th>
                <th class="ibx_th_icoinfo">
                  <b class="icoibx"></b>
                </th>
                <th class="ibx_th_from">邮件主题</th>
                <th class="ibx_th_icoflag">
                  <b class="icoibx"></b>
                </th>
                <th class="ibx_th_subject">邮件摘要</th>
                <th class="ibx_th_date">收件人</th>
                <th class="ibx_th_date">时间</th>
              </tr>
              <tbody></tbody>
            </tbody>
          </table>
          <div class="ibx_lst_dwp dwpopen">
            <table class="ibx_gtable ibx_gtable_con" id="otablecount0" action="list">
              <tbody>
                <?php foreach ($search as $v): ?>
                    <tr class="i_mark0 i_unrd">
                      <td class="ibx_td_f">&nbsp;</td>
                      <td class="ibx_td_chkbx">
                        <input type="checkbox" value="<?php echo $v->sid;?>" name="checked[]" index="0">
                      </td>
                      <td class="ibx_td_icoinfo">
                        
                      </td>
                      <td class="ibx_td_from"><a href="#"><?php echo $v->title?></a></td>
                      <td class="ibx_td_icoflag"><b class="icoibx"></b></td>
                      <td class="ibx_td_subject"><a href="#"><?php echo $v->content?></a></td>
                      <td class="ibx_td_date"><?php echo $v->to_who?></td>
                      <td class="ibx_td_date"><?php echo $v->time?></td>
                    </tr>
                <?php endforeach; ?>
                <tbody></tbody>
              </tbody>
            </table>
          </div>
        </div>
        <div class="gtoolbar gtbrbtm">
          <input class="btn btnnml" hidefocus type="submit" value="删除" outclass="btn btnnml impbtn" overclass="btn btnhv impbtn" onclick="del()">
          <div class="extra">
            <span class="txt">
              <?php echo $page;?>
            </span>
          </div>
        </div>
      </div>
    </div>
  </form>
    <script type="text/javascript">
        function del(){ document.recive_message.action="<?php echo site_url('content/del_send_mail');?>"; }

        function selectAll() {
            var obj = document.getElementsByName('selectall');
            var cks = document.getElementsByTagName("input");
            var ckslen = cks.length;
            for(var i=0;i<ckslen-1;i++) {
                if(cks[i].type == 'checkbox') {
                    cks[i].checked = obj[0].checked;
                }
            }
        }
    </script>
</body>
</html>